From: Biao Zhu Date: Sun, 7 Sep 2025 12:23:25 +0000 (+0800) Subject: fluent-bit: update to 4.0.9 X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=2b99cd7d7637da0f152da378994f699aaf0dd44d;p=feed%2Fpackages.git fluent-bit: update to 4.0.9 - Remove obsolete patch - Add patch replace NPN with ALPN for client connections \ because the default OpenSSL library does not enable NPN. - Add newly libstdcpp dependency Build system: aarch64 Build-tested: mediatek/filogic Run-tested: mediatek/filogic Signed-off-by: Biao Zhu --- diff --git a/admin/fluent-bit/Makefile b/admin/fluent-bit/Makefile index 6fc245eebc..c9e1fc0c39 100644 --- a/admin/fluent-bit/Makefile +++ b/admin/fluent-bit/Makefile @@ -1,13 +1,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fluent-bit -PKG_VERSION:=3.1.9 +PKG_VERSION:=4.0.9 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/fluent/fluent-bit.git PKG_SOURCE_VERSION=v$(PKG_VERSION) -PKG_MIRROR_HASH:=cb81f94e4d4b1cb88dee06f9534efbb7fdc92a24d950cab7ccbd1a01d89bf908 +PKG_MIRROR_HASH:=3826f4d1c37a9aee45db5f4e13f0779e5ab23638993009b24b524ec7be05096f PKG_LICENSE:=Apache-2.0 PKG_LICENSE_FILES:=LICENSE @@ -20,7 +20,7 @@ define Package/fluent-bit CATEGORY:=Administration TITLE:=Fast and Lightweight Logs and Metrics processor URL:=https://fluentbit.io/ - DEPENDS:= +libyaml +libopenssl +libcurl +libatomic +musl-fts +flex +bison + DEPENDS:= +libyaml +libopenssl +libcurl +libstdcpp +libatomic +musl-fts +flex +bison endef define Package/fluent-bit/description diff --git a/admin/fluent-bit/patches/010-musl-strerror_r.patch b/admin/fluent-bit/patches/010-musl-strerror_r.patch deleted file mode 100644 index 4f65f49c1b..0000000000 --- a/admin/fluent-bit/patches/010-musl-strerror_r.patch +++ /dev/null @@ -1,30 +0,0 @@ -Fix -Wint-conversion error with gcc 14 due to musl using POSIX strerror_r. - -``` -/home/build/aports/testing/fluent-bit/src/fluent-bit-3.1.9/src/flb_network.c: In function 'net_connect_async': -/home/build/aports/testing/fluent-bit/src/fluent-bit-3.1.9/src/flb_network.c:566:17: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] - 566 | str = strerror_r(error, so_error_buf, sizeof(so_error_buf)); -``` - ---- a/src/flb_network.c -+++ b/src/flb_network.c -@@ -551,9 +551,6 @@ static int net_connect_async(int fd, - } - - /* Connection is broken, not much to do here */ --#if ((defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) || \ -- (defined(_XOPEN_SOURCE) || _XOPEN_SOURCE - 0L >= 600L)) && \ -- (!defined(_GNU_SOURCE)) - ret = strerror_r(error, so_error_buf, sizeof(so_error_buf)); - if (ret == 0) { - str = so_error_buf; -@@ -562,9 +559,6 @@ static int net_connect_async(int fd, - flb_errno(); - return -1; - } --#else -- str = strerror_r(error, so_error_buf, sizeof(so_error_buf)); --#endif - flb_error("[net] TCP connection failed: %s:%i (%s)", - u->tcp_host, u->tcp_port, str); - return -1; diff --git a/admin/fluent-bit/patches/100-tls-replace-NPN-with-ALPN-for-client-connections.patch b/admin/fluent-bit/patches/100-tls-replace-NPN-with-ALPN-for-client-connections.patch new file mode 100644 index 0000000000..36f3e4580f --- /dev/null +++ b/admin/fluent-bit/patches/100-tls-replace-NPN-with-ALPN-for-client-connections.patch @@ -0,0 +1,54 @@ +From 1d8ae53900e27a28fa31adb7f71f235ce919bafc Mon Sep 17 00:00:00 2001 +From: Biao Zhu +Date: Tue, 2 Sep 2025 23:45:31 +0800 +Subject: [PATCH] tls: replace NPN with ALPN for client connections + +Signed-off-by: Biao Zhu +--- + src/tls/openssl.c | 28 +++++++++------------------- + 1 file changed, 9 insertions(+), 19 deletions(-) + +--- a/src/tls/openssl.c ++++ b/src/tls/openssl.c +@@ -198,21 +198,6 @@ static int tls_context_server_alpn_selec + return result; + } + +-static int tls_context_client_alpn_select_callback(SSL *ssl, +- unsigned char **out, +- unsigned char *outlen, +- const unsigned char *in, +- unsigned int inlen, +- void *arg) +-{ +- return tls_context_server_alpn_select_callback(ssl, +- (const unsigned char **) out, +- outlen, +- in, +- inlen, +- arg); +-} +- + int tls_context_alpn_set(void *ctx_backend, const char *alpn) + { + size_t wire_format_alpn_index; +@@ -283,10 +268,15 @@ int tls_context_alpn_set(void *ctx_backe + ctx); + } + else { +- SSL_CTX_set_next_proto_select_cb( +- ctx->ctx, +- tls_context_client_alpn_select_callback, +- ctx); ++ if (ctx->alpn == NULL) { ++ return -1; ++ } ++ if (SSL_CTX_set_alpn_protos( ++ ctx->ctx, ++ (const unsigned char *) &ctx->alpn[1], ++ (unsigned int) ctx->alpn[0]) != 0) { ++ return -1; ++ } + } + } +